package com.qfedu.fmmall.controller;

import com.qfedu.fmmall.common.vo.ResultVO;
import com.qfedu.fmmall.service.UserAddrService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author : yanBin
 * @date :2021/12/20 15:25
 */
@RestController
@CrossOrigin
@Api(value = "提供收货地址相关地址", tags = "收货地址管理")
@RequestMapping("/useraddr")
public class UserAddrController {
    @Resource
    private UserAddrService userAddrService;


    @GetMapping("/")
    @ApiImplicitParam(dataType = "int", name = "userId", value = "用户id", required = true)
    public ResultVO listAddrByUId(int userId, @RequestHeader("token") String token) {
        return userAddrService.listAddrByUId(userId);
    }

}
